<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" isELIgnored="false" %>

<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
        <!-- Sidebar user panel -->
        <div class="user-panel">
            <div class="pull-left image">
                <img src="${pageContext.request.contextPath}/img/user2-160x160.jpg"
                     class="img-circle" alt="User Image">
            </div>
            <div class="pull-left info">
                <p>${user.username}</p>
                <a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
            </div>
        </div>

        <!-- sidebar menu: : style can be found in sidebar.less -->
        <ul class="sidebar-menu">
            <li class="header">菜单</li>
            <li id="admin-index"><a
                    href="${pageContext.request.contextPath}/system/user?operation=toLog"><i
                    class="fa fa-dashboard"></i> <span>首页</span></a></li>

       <%--     <c:forEach items="${moduleList}" var="item">
                <c:if test="${item.ctype==0}">
                    <li class="treeview">
                        <a href="#">
                            <i class="fa fa-cube"></i> <span>${item.name}</span>
                            <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
                        </a>
                        <ul class="treeview-menu">
                            <c:forEach items="${moduleList}" var="item2">
                                <c:if test="${item2.ctype==1 && item2.parentId == item.id}">
                                    <li id="${item2.id}">
                                        <a onclick="setSidebarActive(this)" href="${ctx}/${item2.curl}" target="iframe">
                                            <i class="fa fa-circle-o"></i>${item2.name}
                                        </a>
                                    </li>
                                </c:if>
                            </c:forEach>
                        </ul>
                    </li>
                </c:if>
            </c:forEach>--%>


            <li class="treeview"><a href="#"> <i class="fa fa-cogs"></i>
                <span>系统管理</span> <span class="pull-right-container"> <i
                        class="fa fa-angle-left pull-right"></i>
				</span>

            </a>
                <ul class="treeview-menu">

                    <c:if test="${fn:contains(permissions,'system/user?operation=findAllByUserNameLike')}">
                        <li id="system-setting">

                            <a href="${pageContext.request.contextPath}/system/user?operation=findAllByUserNameLike"> <i
                                    class="fa fa-circle-o"></i> 用户管理
                            </a></li>
                    </c:if>
                    <c:if test="${fn:contains(permissions,'system/role?operation=findAll')}">
                        <li id="system-setting"><a
                                href="${pageContext.request.contextPath}/system/role?operation=findAll"> <i
                                class="fa fa-circle-o"></i> 角色管理
                        </a></li>
                    </c:if>
                    <c:if test="${fn:contains(permissions,'system/permission?operation=findAll')}">
                        <li id="system-setting"><a
                                href="${pageContext.request.contextPath}/system/permission?operation=findAll">
                            <i class="fa fa-circle-o"></i> 资源权限管理
                        </a></li>
                    </c:if>
                    <c:if test="${fn:contains(permissions,'system/syslog?operation=findAll')}">
                        <li id="system-setting"><a
                                href="${pageContext.request.contextPath}/system/syslog?operation=findAll"> <i
                                class="fa fa-circle-o"></i> 访问日志
                        </a></li>
                    </c:if>
                </ul>
            </li>

            <li class="treeview"><a href="#"> <i class="fa fa-cube"></i>
                <span>基础数据</span> <span class="pull-right-container"> <i
                        class="fa fa-angle-left pull-right"></i>
				</span>
            </a>
                <ul class="treeview-menu">
                    <c:if test="${fn:contains(permissions,'store/product?operation=findAll')}">
                        <li id="system-setting"><a
                                href="${pageContext.request.contextPath}/store/product?operation=findAll">
                        <i class="fa fa-circle-o"></i> 产品管理
                        </a></li>
                    </c:if>
                    <c:if test="${fn:contains(permissions,'store/orders?operation=findAll')}">
                        <li id="system-setting"><a
                                href="${pageContext.request.contextPath}/store/orders?operation=findAll"> <i
                                class="fa fa-circle-o"></i> 订单管理
                        </a></li>
                    </c:if>
                </ul>
            </li>
            </a></li>


        </ul>
    </section>
    <!-- /.sidebar -->
</aside>